package com.bwie.controller;

import com.bwie.service.IAuthService;
import com.bwie.service.UserService;
import com.bwie.utils.R;
import com.bwie.vo.LoginInfoVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author GaoYiJie
 * @Description
 * @Create 2025/4/17 9:44
 * @Version 1.0
 */
@RestController
@RequestMapping("/city/user")
public class UserController {

    @Resource
    UserService userService;

    @Resource
    IAuthService authService;


    @PostMapping("/login")
    public R login(@RequestBody LoginInfoVo loginInfoVo){
        return userService.login(loginInfoVo);
    }

    //测试远程调用
    @GetMapping("/applyToken")
    public String applyToken(){
        return authService.applyToken();
    }
}
